package de.nak.fireDepartment.service;

import javax.servlet.ServletContext;

import org.apache.struts.upload.FormFile;

import de.nak.fireDepartment.exceptions.ImageUploadException;

/**
 * Interface for uploading an Image
 * @author Sven Redelin
 *
 */
public interface ImageUploadService {

	/**
	 * Public Static Values for representing the operation 
	 */
	public static String DEPARTMENT = "Department";
	public static String CAR = "CAR";
	public static String EQUIPMENT = "EQUIPMENT";
	
	/**
	 * Uploads a File to Server
	 * @param aFile
	 * @param fileType
	 * @param servletContext
	 * @return
	 * @throws ImageUploadException
	 */
	String uploadFile(FormFile aFile, String fileType, ServletContext servletContext) throws ImageUploadException;

	/**
	 * Deletes a File from Server
	 * @param relativeImagePath
	 * @param servletContext
	 * @throws ImageUploadException
	 */
	void deleteImage(String relativeImagePath, ServletContext servletContext) throws ImageUploadException;
}
